import type { RouteRecordRaw } from 'vue-router';
import { Layout } from '@/router/constant';

/**
 * @param name 路由名称, 必须设置,且不能重名
 * @param meta 路由元信息（路由附带扩展信息）
 * @param redirect 重定向地址, 访问这个路由时,自定进行重定向
 * @param meta.disabled 禁用整个菜单
 * @param meta.title 菜单名称
 * @param meta.icon 菜单图标
 * @param meta.keepAlive 缓存该路由
 * @param meta.sort 排序越小越排前
 *
 */
const routes: Array<RouteRecordRaw> = [
  {
    path: '/gather',
    name: 'Gather',
    redirect: '/gather/parameter',
    component: Layout,
    meta: {
      title: 'gather',
      sort: 1,
      icon: 'gather',
    },
    children: [
      {
        path: 'parameter',
        name: 'Parameter',
        meta: {
          title: 'parameter',
        },
        component: () => import('@/views/permission/gather/parameter/index.vue'),
      },
      {
        path: 'machine',
        name: 'GatherMachine',
        meta: {
          title: 'gatherMachine',
        },
        component: () => import('@/views/permission/gather/machine/index.vue'),
      },
      {
        path: 'machine/add',
        name: 'GatherMachineAdd',
        meta: {
          title: 'gatherMachineAdd',
          activeMenu: 'GatherMachine',
        },
        component: () => import('@/views/permission/gather/machine/add.vue'),
      },
      {
        path: 'machine/edit/:id',
        name: 'GatherMachineEdit',
        meta: {
          title: 'gatherMachineEdit',
          activeMenu: 'GatherMachine',
        },
        component: () => import('@/views/permission/gather/machine/edit.vue'),
      },
      {
        path: 'machine/copy/:id',
        name: 'GatherMachineCopy',
        meta: {
          title: 'gatherMachineCopy',
          activeMenu: 'GatherMachine',
        },
        component: () => import('@/views/permission/gather/machine/copy.vue'),
      },
      {
        path: 'distribute',
        name: 'Distribute',
        meta: {
          title: 'distribute',
        },
        component: () => import('@/views/permission/gather/distribute/index.vue'),
      },
      {
        path: 'distribute/add',
        name: 'DistributeAdd',
        meta: {
          title: 'distributeAdd',
          activeMenu: 'Distribute',
        },
        component: () => import('@/views/permission/gather/distribute/add.vue'),
      },
      {
        path: 'distribute/edit/:id',
        name: 'DistributeEdit',
        meta: {
          title: 'distributeEdit',
          activeMenu: 'Distribute',
        },
        component: () => import('@/views/permission/gather/distribute/edit.vue'),
      },
      {
        path: 'distribute/copy/:id',
        name: 'DistributeCopy',
        meta: {
          title: 'distributeCopy',
          activeMenu: 'Distribute',
        },
        component: () => import('@/views/permission/gather/distribute/copy.vue'),
      },
      // {
      //   path: 'interfaceBtn',
      //   name: 'InterfaceBtn',
      //   meta: {
      //     title: 'interfaceBtn',
      //   },
      //   component: () => import('@/views/permission/gather/interfaceBtn/index.vue'),
      // },
      {
        path: 'interfaceImage',
        name: 'InterfaceImage',
        meta: {
          title: 'interfaceImage',
        },
        component: () => import('@/views/permission/gather/interfaceImage/index.vue'),
      },
      // {
      //   path: 'interface',
      //   name: 'Interface',
      //   meta: {
      //     title: 'interface',
      //   },
      //   component: () => import('@/views/permission/gather/interface/index.vue'),
      // },
      // {
      //   path: 'machineUnit',
      //   name: 'MachineUnit',
      //   meta: {
      //     title: 'machineUnit',
      //   },
      //   component: () => import('@/views/permission/gather/machineUnit/index.vue'),
      // },
      // {
      //   path: 'adjustmentProcess',
      //   name: 'AdjustmentProcess',
      //   meta: {
      //     title: 'adjustmentProcess',
      //   },
      //   component: () => import('@/views/permission/gather/adjustmentProcess/index.vue'),
      // },
      // {
      //   path: 'adjustment',
      //   name: 'Adjustment',
      //   meta: {
      //     title: 'adjustment',
      //   },
      //   component: () => import('@/views/permission/gather/adjustment/index.vue'),
      // },
      {
        path: 'machineAdjustment',
        name: 'MachineAdjustment',
        meta: {
          title: 'machineAdjustment',
        },
        component: () => import('@/views/permission/gather/machineAdjustment/index.vue'),
      },
    ],
  },
];

export default routes
